/*
* pps_bom
*/
package com.pitop.bom.entity;

/**
 * bom日志 的实体类的状态
 *
 * @author berton
 */
public enum BomLogState implements java.io.Serializable {
    //枚举定义在此
    Modify("修改"),
    Delete("删除"),
    Create("创建"),
    Copy("复制"),
    Stop("禁用"),;
    private String val;

    BomLogState(String val) {
        this.val = val;
    }

    /**
     * 根据状态名称查询状态
     *
     * @param stateName
     * @return
     */
    public static BomLogState getEnum(String stateName) {
        for (BomLogState bomLogState : BomLogState.values()) {
            if (bomLogState.name().equalsIgnoreCase(stateName)) {
                return bomLogState;
            }
        }
        return null;
    }

    @Override
    public String toString() {
        return this.name();
    }

}
